package com.jsbj.user.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jsbj.base.ResultBean;
import com.jsbj.user.entities.SysUser;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 系统登录用户表 服务类
 * </p>
 *
 * @author jsbj
 * @since 2022-02-21
 */
public interface ISysUserService extends IService<SysUser> {

    SysUser queryByLoginId(String loginId);

    ResultBean<Object> registerUser(JSONObject object);

    ResultBean sendMess(String phoneNumber, String sign);

    ResultBean checkMessage(String phoneNumber, String message);

    void updateEquipmentId(String uid, String equipmentId, String equipmentType);

    ResultBean<Object> updatePassword(JSONObject object);

    List<Map<String, Object>> getUsersByTenantCode(String tenantCode);

    SysUser getUserByTenantCode(String tenantCode);

    ResultBean<String> add(SysUser sysUser) throws Exception;

    Integer delete(String id);

    IPage<SysUser> getList(String inParam);

    List<SysUser> getUserData(String userName);

    Integer passwordReset(String inParam);

    List<String> getAllUserByTenantCode(String tenantCode);

    void downloadTemplate(HttpServletResponse response, String tenantCode);

    Map<String, Object> importExcel(MultipartFile uploadFile, String tenantCode);

    String addUserByZhgd(String inParam);

    SysUser verificatLoginIdAndPasswrod(String loginId, String password);

    Boolean getSuperUserFlag();

    List<Map<String, Object>> getUser();

    SysUser getDetail(String userId);

    List<SysUser> queryUsersByGroupIds(List<String> groupIdList);

    List<SysUser> queryUsersByTenantCode(String tenantCode);

    List<SysUser> queryUsersByTenantAndOrg(String tenantCode, String orgCode);

    IPage<Map<String, Object>> getUserListPage(HttpServletRequest request, String inParam);


    List<Map<String, Object>> getUsersByTenantCodeAndOrgCode(String tenantCode, String orgCode);

    Integer feignAdd(SysUser sysUser);

    Integer feignDelete(String id, String userId);

    void configExpertQX(List<String> loginIds,List<String> delLoginIds, String tenantCode);

    List<String> getByLoginIds(List<String> loginIds);

    List<Map<String,Object>> getUserListByTenantCodeAndOrgCode(String inParam);

    List<Map<String,Object>> getUserListByTenantCodeAndOrgCodeSuper(String inParam);

    List<SysUser> getByRoleCode(String roleCode);

    String getUserOrgInfoByUserId(String userId, String tenantCode);
}
